package com.test.controller;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.test.comment.SingerScore;
import com.test.services.ShowServices;

@Controller
@ResponseBody
@RequestMapping("/score")
public class ShowController {
	private Logger logger = Logger.getLogger(getClass());
	@Autowired
	ShowServices showServices;
	@RequestMapping("/showScore")
	public ModelAndView goshowScore() {
		return new ModelAndView("showScore");
	}
	@RequestMapping("/user")
	public List<SingerScore> user(){
		logger.debug("===========接受了");
		List<SingerScore> singerScores =showServices.findsingerscore();
		return singerScores;
	}
}
